<template>
	<div class="ffffff mainpadding radius text_ht color_three" style="width: 75%;">
		<div v-if="type==1" v-html="dataAll.sys_user_privacy"></div>
		<div v-if="type==2" v-html="dataAll.sys_user_about"></div>
		<div v-if="type==3" v-html="dataAll.sys_user_agree"></div>
		<div v-if="type==4" v-html="detail"></div>
		
	</div>
</template>

<script>
	import {
		systeminit,
		helpcenter_detail
	} from "@/API/system"
	export default {
		data() {
			return {
				dataAll: {},
				type:1,
				detail:""
			}
		},
		watch: {
			$route(to, from) {
				this.type = this.$route.params.type 
				console.log(this.$route.params ,">>>>>>>>");
				// console.log(this.$route.query.id,">>>>>>>>");
				// if(this.type==4){
				// 	console.log(this.$route.query.id,">>>>>>>>");
				// 	this.gethelp()
				// }
			},
		},
		created() {
			this.$bus.$on("changePathtext",data=>{
				if(data=="/setUp/agreement/1"){
					this.type= 1
				}
				if(data=="/setUp/agreement/2"){
					this.type= 2
				}
				if(data=="/setUp/agreement/3"){
					this.type= 3
				}
			})
			// console.log(this.$route.query.id,">>>>>》》》》》》>>>");
			this.init()
		},
		methods:{
			async init(){
				let data = await systeminit()
				this.dataAll = data.data.data
			},
			gethelp(){
				helpcenter_detail({
					id:this.$route.query.id
				}).then(res=>{
					this.detail = res.data.data.content
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
</style>